{% extends 'settings_base.html' %}
{% load i18n %}
{% load crispy_forms_tags %}

{% block actions %}
  {% if object %}
  <a href="{% url 'integrations:builder-detail' object.id %}" class="btn btn-primary">
      {% translate "Live edit and test" %}
  </a>
  {% endif %}
{% endblock %}
{% block settings_content %}
  <div class="card-body">
    <form method="post">
      {% csrf_token %}
      {{ form|crispy }}
      <button type="submit" class="btn btn-primary">{% if button_text %}{{ button_text }}{% else %}{% translate "Submit" %}{% endif %}</button>
    </form>
    {% if object.has_oauth and not object.enabled_oauth %}
      {% translate "Redirect URL:" %} {{ request.scheme }}://{{ request.get_host }}{% url 'integrations:oauth-callback' object.id %}
    {% endif %}
  </div>
{% endblock %}
